Remove gdk_surface_coords_to/from_parent
authorMatthias Clasen <mclasen@redhat.com>
Mon, 25 Mar 2019 01:04:34 +0000 (21:04 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 28 May 2019 20:25:14 +0000 (20:25 +0000)
This api was unused, and surfaces have no parents anymore.

docs/reference/gdk/gdk4-sections.txt
gdk/gdksurface.c
gdk/gdksurface.h

index 98b19230e8efb2b926e3210ec771be0245402382..9fde1ae28009f7baec42808e4fb45166f2a60965 100644 (file)
@@ -283,10 +283,6 @@ gdk_surface_set_support_multidevice
 gdk_surface_get_device_cursor
 gdk_surface_set_device_cursor
 
-<SUBSECTION>
-gdk_surface_coords_from_parent
-gdk_surface_coords_to_parent
-
 <SUBSECTION Standard>
 GDK_SURFACE
 GDK_SURFACE_GET_CLASS
index ce2b4b9f30dc4e263620bdb2c1628278171967a8..57934c92ee27a8a82eb06e6eb93c47de02b35890 100644 (file)
@@ -2262,70 +2262,6 @@ gdk_surface_get_root_coords (GdkSurface *surface,
                                x, y, root_x, root_y);
 }
 
-/**
- * gdk_surface_coords_to_parent:
- * @surface: a child surface
- * @x: X coordinate in child’s coordinate system
- * @y: Y coordinate in child’s coordinate system
- * @parent_x: (out) (allow-none): return location for X coordinate
- * in parent’s coordinate system, or %NULL
- * @parent_y: (out) (allow-none): return location for Y coordinate
- * in parent’s coordinate system, or %NULL
- *
- * Transforms surface coordinates from a child surface to its parent
- * surface. Calling this function is equivalent to adding the return
- * values of gdk_surface_get_position() to the child coordinates.
- *
- * See also: gdk_surface_coords_from_parent()
- **/
-void
-gdk_surface_coords_to_parent (GdkSurface *surface,
-                              gdouble    x,
-                              gdouble    y,
-                              gdouble   *parent_x,
-                              gdouble   *parent_y)
-{
-  g_return_if_fail (GDK_IS_SURFACE (surface));
-
-  if (parent_x)
-    *parent_x = x + surface->x;
-
-  if (parent_y)
-    *parent_y = y + surface->y;
-}
-
-/**
- * gdk_surface_coords_from_parent:
- * @surface: a child surface
- * @parent_x: X coordinate in parent’s coordinate system
- * @parent_y: Y coordinate in parent’s coordinate system
- * @x: (out) (allow-none): return location for X coordinate in child’s coordinate system
- * @y: (out) (allow-none): return location for Y coordinate in child’s coordinate system
- *
- * Transforms surface coordinates from a parent surface to a child
- * surface.
- *
- * Calling this function is equivalent to subtracting the return
- * values of gdk_surface_get_position() from the parent coordinates.
- *
- * See also: gdk_surface_coords_to_parent()
- **/
-void
-gdk_surface_coords_from_parent (GdkSurface *surface,
-                                gdouble    parent_x,
-                                gdouble    parent_y,
-                                gdouble   *x,
-                                gdouble   *y)
-{
-  g_return_if_fail (GDK_IS_SURFACE (surface));
-
-  if (x)
-    *x = parent_x - surface->x;
-
-  if (y)
-    *y = parent_y - surface->y;
-}
-
 /**
  * gdk_surface_input_shape_combine_region:
  * @surface: a #GdkSurface
index 39ed4a98550d59c1cb26fbe865bd589936c096ec..2ff71e62a69083d85a4098f06cb54528761799f4 100644 (file)
@@ -603,19 +603,6 @@ void          gdk_surface_get_root_coords (GdkSurface     *surface,
                                            gint            *root_x,
                                            gint            *root_y);
 GDK_AVAILABLE_IN_ALL
-void       gdk_surface_coords_to_parent   (GdkSurface       *surface,
-                                           gdouble          x,
-                                           gdouble          y,
-                                           gdouble         *parent_x,
-                                           gdouble         *parent_y);
-GDK_AVAILABLE_IN_ALL
-void       gdk_surface_coords_from_parent (GdkSurface       *surface,
-                                           gdouble          parent_x,
-                                           gdouble          parent_y,
-                                           gdouble         *x,
-                                           gdouble         *y);
-
-GDK_AVAILABLE_IN_ALL
 void          gdk_surface_get_root_origin (GdkSurface     *surface,
                                            gint            *x,
                                            gint            *y);